package com.qidian.mes.qc.controller;

import com.qidian.mes.pojo.Oqc;
import com.qidian.mes.qc.service.OqcService;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@CrossOrigin
@RequestMapping("/oqc")
public class OqcController {
    @Autowired
    private OqcService oqcService;
    @GetMapping("/get")
    public MESResult get(Long oqcId){
        return oqcService.queryById(oqcId);
    }
    //分页搜索
    @GetMapping("/list")
    public  MESResult list(@RequestParam(defaultValue = "1")int page, @RequestParam(defaultValue = "10") int limit, Oqc oqc){
        return oqcService.list(page,limit,oqc);
    }

}
